﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppGene.DataModel.Samples.TestDatabase
{
    [LogicalTable]
    [LogicalIndex(new string[]{"FieldGuid"})]
    [LogicalIndex(new string[]{})]
    [LogicalPrimaryKey("AllLogicalDataTypeID", IsClustered= true)]
    public class AllLogicalDataType
    {
        [LogicalColumn(IsIdentity=true)]
        public int AllLogicalDataTypeID { get; set; }

        public bool FieldBoolean { get; set; }

        public byte FieldByte { get; set; }

        public byte[] FieldByteArray { get; set; }

        [LogicalColumn(Length = 256)]
        public char[] FieldCharArrayToString { get; set; }

        [LogicalColumn(DataType = DbType.StringFixedLength, Length = 256)]
        public char[] FieldCharArrayToStringFixedLength { get; set; }

        [LogicalColumn(DataType = DbType.AnsiString, Length = 256)]
        public char[] FieldCharArrayToAnsiString { get; set; }

        [LogicalColumn(DataType = DbType.AnsiStringFixedLength, Length = 256)]
        public char[] FieldCharArrayToAnsiStringFixedLength { get; set; }

        public DateTime FieldDate { get; set; }

        [LogicalColumn(DataType = DbType.DateTime)]
        public DateTime FieldDateTime { get; set; }

        [LogicalColumn(DataType = DbType.DateTime2)]
        public DateTime FieldDateTime2 { get; set; }

        public DateTimeOffset FieldDateTimeOffset { get; set; }

        public Guid FieldGuid { get; set; }

        public decimal FieldDecimal { get; set; }

        public double FieldDouble { get; set; }

        public short FieldInt16 { get; set; }

        public int FieldInt32 { get; set; }

        public long FieldInt64 { get; set; }

        public Single FieldSingle { get; set; }

        public AllLogicalDataTypesFieldEnumEnum FieldEnum { get; set; }

        [LogicalColumn(Length = 255)]
        public string FieldString { get; set; }

        [LogicalColumn(DataType = DbType.StringFixedLength, Length = 256)]
        public string FieldStringFixedLength { get; set; }

        [LogicalColumn(DataType = DbType.AnsiString, Length = 31)]
        public string FieldAnsiString { get; set; }

        [LogicalColumn(DataType = DbType.AnsiStringFixedLength, Length = 32)]
        public string FieldAnsiStringFixedLength { get; set; }

        public TimeSpan FieldTimeSpan { get; set; }

        public object FieldObject { get; set; }
    }
}
